import random
num=random.randint(1,100)
print(num)
guess =int(input("请输入你猜的数字:"))
n=1
while n<100:
    if guess< num:
        print("你猜小了")
    elif guess>num:
        print("你猜大了")
    guess=int(input("请重新输入:"))
    n=n+1
    if n<3 and guess == num:
        print("你是师傅")
        break
    elif 3<=n<6 and guess==num:
        print("你是沙僧")
        break
    elif n>6 and guess==num:
        print("你是悟空")
        break
